//
//  BaseCollectionView.h
//  公考神器
//
//  Created by 毕武侠 on 16/3/14.
//  Copyright © 2016年 毕武侠. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol didSelectCollectionDelegate <NSObject>

- (void)collectionView:(UICollectionView *)collectionView didSelectIndexPath:(NSIndexPath *)indexPath;

@optional
- (void)collectionView:(UICollectionView *)collectionView didActionIndexPath:(NSIndexPath *)indexPath infoData:(id)data;

@end


typedef void(^stepBlock) (NSInteger index);

@interface BaseCollectionView : UICollectionView

@property (nonatomic, strong) NSMutableArray *sourceData;

@property (nonatomic, assign) CGFloat minLineSpace;
@property (nonatomic, assign) CGFloat minInteritemSpace;
@property (nonatomic, assign) UIEdgeInsets edgeInsets;

@property (nonatomic, strong) NSString *url;
@property (nonatomic, strong) SGParameter *parameter;

@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *message;

@property (nonatomic, strong) NSString *modelClass;
@property (nonatomic, strong) NSString *cellClassName;
@property (nonatomic, strong) NSString *identifier;
@property (nonatomic, assign) BOOL allowTouchData;
/*  当前位置  */
@property(nonatomic,assign)NSInteger step;


@property(nonatomic,copy)stepBlock block;


@property (nonatomic, weak) id<didSelectCollectionDelegate> didDatagate;

- (void)initstance;

- (void)initRefreshView;

- (void)refreshView;

- (void)registerCellClass:(NSString *)cellClassName cellIdentifier:(NSString *)identifier;

- (void)reloadNewData;

@end
